<%--
  Created by IntelliJ IDEA.
  User: qiliping
  Date: 15/12/2
  Time: 下午3:44
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>修改基金经理</title>
</head>
<body>
<div class="row">
    <div class="col-md-12">
        <!-- BEGIN PAGE TITLE & BREADCRUMB-->
        <h3 class="page-title">
            基金经理列表 <small>修改基金经理</small>
        </h3>
        <ul class="page-breadcrumb breadcrumb">
            <li><i class="fa fa-home"></i> <a href="${ctx}"> 首页 </a> <i
                    class="fa fa-angle-right"></i></li>
            <li><a href="${ctx}/fund_manager_list"> 基金经理列表 </a> <i
                    class="fa fa-angle-right"></i></li>
            <li><a href="#"> 修改基金经理 </a></li>
        </ul>
        <!-- END PAGE TITLE & BREADCRUMB-->
    </div>
</div>
<!-- END PAGE HEADER-->
<!------内容区---->
<div class="main">

    <div class="row">
        <div class="col-md-12">
            <form:form modelAttribute="FundManagerAddModel" method="post"
                       class="form-horizontal">
                <form:hidden path="managerId"></form:hidden>
                <div class="form-group">
                    <label class="control-label col-md-3">姓名：</label>
                    <div class="col-md-4">
                        <form:input path="managerName" cssClass="form-control" placeholder=""></form:input>
                    </div>
                    <form:errors path="managerName" cssClass="field-validation-error" element="div"></form:errors>
                </div>

                <div class="form-group">
                    <label class="control-label col-md-3">头像：</label>
                    <div class="col-md-4">
                        <div class="input-group">
                            <img alt="" id="aimg" src="${FundManagerAddModel.managerPic}" width="100px" height="100px" />
                            <form:hidden path="managerPic" id="product_pic"/>
                            <input id="image3" type="button" value="上传图片" />
                        </div>
                        <form:errors path="managerPic"></form:errors>
                    </div>

                </div>
                <div class="form-group">
                    <label class="control-label col-md-3">所在公司：</label>
                    <div class="col-md-4">
                        <form:input path="companyName" cssClass="form-control" placeholder=""></form:input>
                    </div>
                    <form:errors path="companyName" cssClass="field-validation-error" element="div"></form:errors>
                </div>
                <div class="form-group">
                    <label class="control-label col-md-3">职位：</label>
                    <div class="col-md-4">
                        <form:input path="jobTitle" cssClass="form-control" placeholder=""></form:input>

                    </div>
                    <form:errors path="jobTitle"></form:errors>
                </div>
                <div class="form-group">
                    <label class="control-label col-md-3">从业经验：</label>
                    <div class="col-md-4">
                        <form:input path="experience" cssClass="form-control" placeholder=""></form:input>

                    </div>
                    <form:errors path="experience"></form:errors>
                </div>
                <div class="form-group">
                    <label class="control-label col-md-3">联系电话：</label>
                    <div class="col-md-4">
                        <form:input path="phone" cssClass="form-control" placeholder=""></form:input>

                    </div>
                    <form:errors path="phone"></form:errors>
                </div>
                <div class="form-group">
                    <label class="control-label col-md-3">个人介绍：</label>
                    <div class="col-md-4">
                        <form:textarea path="intro" cssClass="form-control" placeholder=""></form:textarea>

                    </div>
                    <form:errors path="intro"></form:errors>
                </div>
                <div class="form-group">
                    <label class="control-label col-md-3">状态：</label>
                    <div class="col-md-4">

                        <form:select path="status">
                            <form:option value="0">禁用</form:option>
                            <form:option value="1">正常</form:option>
                        </form:select>

                    </div>

                </div>
                <div class="form-group">
                    <div class="col-md-9 col-md-offset-3">
                        <button type="submit" class="btn blue">保存</button>
                        <span class="field-validation-error">${error}</span>
                    </div>
                </div>
            </form:form>
        </div>
    </div>

</div>
<myfooter> <script>
    var editor;
    KindEditor.ready(function(K) {
        editor = K.create('textarea[name="adviserIntro"]', {
            allowFileManager : true
        });

        var uploadbutton = K.uploadbutton({
            button : K('#image3')[0],
            fieldName : 'imgFile',
            url : '${ctx}/file_upload?dir=image',
            afterUpload : function(data) {
                if (data.error === 0) {
                    var url = K.formatUrl(data.url, 'absolute');
                    aimg
                    K('#aimg').attr("src", url);
                    K('#product_pic').val(url);
                } else {
                    alert(data.message);
                }
            },
            afterError : function(str) {
                alert('自定义错误信息: ' + str);
            }
        });
        uploadbutton.fileBox.change(function(e) {
            uploadbutton.submit();
        });
    });
</script> </myfooter>
</body>
</html>